//Page Object
Page({
  data: {
    "message":"你好唐勇军",
    "isGirl":false,
    "num":998,
    "stu":{
      "name":"tyj",
      "age":18,
      "sex":"男",
      "heigth":170,
    },
    "isTure":false,
    list:[
      {"id":0,"name":"猪八戒"},
      {"id":1,"name":"沙和尚"},
      {"id":2,"name":"孙悟空"},
      {"id":3,"name":"唐僧"},
      {"id":4,"name":"kalaok"},
    ],
    "num2":0
  },
  //执行输入框的input事件
  handleInput(e){
    console.log(e.detail.value);
    this.setData({
      num2:e.detail.value
    })
  },
  //加减的点击事件
  handtap(e){
    //console.log(e);
    //1.获取自定义属性operation
    const operation = e.currentTarget.dataset.operation
    //console.log(operation);
    this.setData({
      num2: this.data.num2 + operation
    }) 
  }
});
  